﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MultiWallpaperManager
{
	public class WindowsStartup
	{
		public const string StartUpRegistryItemName = "multiwallpapermanager";
		public const string StartUpOptionString = "-winstartup";

		public static void AddStartUp()
		{
			string exeName = Environment.GetCommandLineArgs()[0];
			string exePath = System.IO.Path.Combine(Environment.CurrentDirectory, exeName);

			string registryItemValue = "\"" + exePath + "\" " + StartUpOptionString;

			WindowsAPI.AddStartupItem(StartUpRegistryItemName, registryItemValue);
		}

		public static void RemoveStartUp()
		{
			WindowsAPI.RemoveStartupItem(StartUpRegistryItemName);
		}
	}
}
